<%-- 
    Document   : login
    Created on : Jun 16, 2012, 4:07:35 PM
    Author     : Home
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link href="../css1/login.css" rel="stylesheet" type="text/css" />
        <title>Administrator</title>
        <script>
            function validLogin(){
                if (document.form1.user.value==""){
                    alert ( "Please enter User Name." );
                    document.loginform.userName.focus();
                    return false;
                }
                if (document.form1.pass.value == ""){
                    alert ( "Please enter password." );
                    document.userform.password.focus();
                    return false;
                }
                return true;
            }
        </script>
    </head>
    <body>
        <div id="logo">
            <img src="../images/logo.png" alt="logopng" width="116" height="34" />
        </div>
        <div class="box">
            <div class="welcome" id="welcometitle">
            </div>
            <div id="fields"> 
                <form name="form1" action="checklogin.jsp" method="post" onsubmit="return validLogin();">
                    <table width="333">
                        <tr>
                            <td width="79" height="35"><span class="login">USERNAME</span></td>
                            <td width="244" height="35">
                                <label>
                                    <input name="user" type="text" class="fields" id="username" size="30" />
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <td height="35"><span class="login">PASSWORD</span></td>
                            <td height="35"><input name="pass" type="password" class="fields" id="password" size="30" /></td>
                        </tr>
                        <tr>
                            <td height="65">&nbsp;</td>
                            <td height="65" valign="middle">
                                <label>
                                    <input name="button" type="submit" class="button" id="button" value="LOGIN" />
                                </label>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="login" id="lostpassword">
                <font style="color: red; font-size: 14; font-weight: bold;"><%

                    if (session.getAttribute("error") == null) {
                        out.print("");
                    } else {
                        out.print(session.getAttribute("error"));
                        session.setAttribute("error", "");
                    }%>
                </font>
            </div>
        </div>
    </body>
</html>
